package com.tree.redisson.runner;

import com.tree.redisson.IUserService;
import com.tree.redisson.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

/**
 * Description: <类功能描述>.
 * <p>
 * //Jarvis是否有加入和优雅宕机暴露的接口
 * <br>
 * @Author frankzsliu
 * @Date 2020/11/3 6:52 下午
 * @Version 1.0
 */
@Component
public class LoadPlanRunner {
    @Autowired
    private LoadPlanConsumerThread consumerThread;
    @Autowired
    private LoadPlanProducerThread producerThread;

    @Autowired
    private IUserService userService;

    @PostConstruct
    public void init() {
        start();
    }


    /**
     * 启动
     */
    public void start() {
        consumerThread.setName("consumerThread");
        consumerThread.setDaemon(true);
        consumerThread.start();

        producerThread.setName("producerThread");
        producerThread.setDaemon(true);
        producerThread.start();

//        initProduceUser();
    }


}
